package com.apps.smodule.Security.utils;

import java.util.ArrayList;
import java.util.List;

/**
 * 方法路径处理
 */
public class MethodPathUtils {

    /**
     * 生成一个方法的所有请求路径
     * @param path
     * @param child_paths
     * @return
     */
    public static List<String> CalculationPath(List<String> path,String[] child_paths)
    {
        List<String> result=new ArrayList<>();
        if(path.size()>0) {
            for (String paths : path) {
                for (String realPath : child_paths)
                    result.add(paths + realPath);
            }
        }else
        {
            for (String realPath : child_paths)
                result.add(realPath);
        }
        return result;
    }
}
